<template>
	<div>
		<van-row style="height: 25vh;width: 94vw;margin-left: 2vh;">
			<van-col :span="24">
				<van-swipe :autoplay="3000">
				  <van-swipe-item v-for="(image, index) in images" :key="index">
				    <van-image :src="image" width="100%" height="100%" :redius="10" :lazy-load="true"></van-image>
				  </van-swipe-item>
				</van-swipe>
			</van-col>
		</van-row>
	</div>
</template>

<script>
	import { mapGetters } from 'vuex'
	export default {
	  data() {
	    return {
	      images: [
	        
	      ],
	    };
	  },
	  computed: {
	    ...mapGetters([
	      'swipers'
	    ])
	  },
	  created() {
	  	this.$store.dispatch("vuexSwiper","你好")
	  	.then(e=>{
	  	  console.log(e)
		  let arr=['https://img01.yzcdn.cn/vant/apple-1.jpg',
	        'https://img01.yzcdn.cn/vant/apple-2.jpg',]
		  if(!e.data.data.ad_code){
			  this.images=arr
		  }
	  	})
	  }
	  }
</script>

<style>
	.van-swipe .van-swipe-item {
		height: 150px;
	    color: #fff;
	    font-size: 20px;
	    text-align: center;
	    background-color: #39a9ed;
		
	  }
	  .van-swipe{
		  border-radius: 0.9375rem;
	  }
</style>
